﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace Agresso.Interface.Layer.Domain
{
    public class afxvoyage
    {
        public string attribute_id = string.Empty;
        public string dim_value = string.Empty;
        public string client = string.Empty;
        public DateTime voy_actual_voy_start = new DateTime(1900,1,1);
        public DateTime voy_actual_voy_end = new DateTime(1900, 1, 1);
        public afxvoyage()
        { }
        public afxvoyage(SqlDataReader rd)
        {
            attribute_id = rd["attribute_id"] is DBNull ? "" : rd["attribute_id"].ToString();
            dim_value = rd["dim_value"] is DBNull ? "" : rd["dim_value"].ToString();
            client = rd["client"] is DBNull ? "" : rd["client"].ToString();
            voy_actual_voy_start = rd["voy_actual_voy_start"] is DBNull ? voy_actual_voy_start : Convert.ToDateTime(rd["voy_actual_voy_start"]);
            voy_actual_voy_end = rd["voy_actual_voy_end"] is DBNull ? voy_actual_voy_end : Convert.ToDateTime(rd["voy_actual_voy_end"]);
        }
    }
}
